package edu.washington.cs.workflow.analysis;

import com.ibm.wala.ipa.callgraph.CGNode;

import edu.washington.cs.workflow.util.Utils;

/**
 * Represent the location of a GUI object. How to compare?
 * */
@Deprecated
public class GUIObjectInitInfo {

	public String label = null; //label or caption depending on which object
	public String typeName = null;
	public CGNode node = null;
	public int instructionIndex = -1;
	public String instructionStr = null;
	
	public GUIObjectInitInfo(String label, String typeName, CGNode node) {
		Utils.checkNotNull(label);
		Utils.checkNotNull(typeName);
		Utils.checkNotNull(node);
		this.label = label;
		this.typeName = typeName;
		this.node = node;
	}
	
	public GUIObjectInitInfo(String label, String typeName, CGNode node,
			int instructionIndex, String instructionStr) {
		this(label, typeName, node);
		Utils.checkTrue(instructionIndex > -1);
		Utils.checkNotNull(instructionStr);
		this.instructionIndex = instructionIndex;
		this.instructionStr = instructionStr;
	}
	
	public String getObjectInfo() {
		return typeName + " : " + label;
	}
}